package com.ruoyi.merchant.controller;

import com.ruoyi.merchant.entity.po.User;
import com.ruoyi.merchant.service.UserService;
import com.ruoyi.merchant.utils.Result;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/merchant")
public class MerchantController {
    @Resource
    UserService userService;

    /**
     * 商家登录
     * @param user
     * @return
     */
    @RequestMapping("/businessLogin")
    public Result businessLogin(@RequestBody User user){
        return userService.businessLogin(user);
    }

    /**
     * 专家登录
     * @param user
     * @return
     */
    @RequestMapping("/expertLogin")
    public Result expertLogin(@RequestBody User user){
        return userService.expertLogin(user);
    }

}
